import { NgModule, Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AgentComponent } from './agent.component';
import { Routes, RouterModule } from '@angular/router';
import { AgentGuideComponent } from './agent-guide/agent-guide.component';
import { AgentGuideContentComponent } from './agent-guide/agent-guide-content/agent-guide-content.component';
import { SharedPropertyDetailComponent } from '../shared-property-resource/property-detail/property-detail.component';
import { ProeprtyListsComponent } from './propertyLists/propertyLists.component';

const routes: Routes = [
  {
    path: '',
    component: AgentComponent,
    children: [
      { path: '', redirectTo: 'propertylists' },
      { path: 'propertylists', component: ProeprtyListsComponent },
      {
        path: 'agent-guide', component: AgentGuideComponent,
        children: [
          { path: 'content/:menuKey', component: AgentGuideContentComponent }
        ]
      },
      { path: 'house-detail/:id', component: SharedPropertyDetailComponent },
      { path: 'shared', loadChildren: '../shared-property-resource/shared.module#SharedResourceModule'},
      // { path: 'sales-record', component: SalesRecordComponent },
      // { path: 'property-management', component: PropertyManagementComponent }

    ]
  }
]

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class AgentRoutingModule { }
